1. Field of the Invention
The present invention generally relates to an image reading device and an image forming apparatus in which a reference voltage used when A-D conversion is performed on an output of a photoelectric device is variable.
2. Description of the Related Art
In general, in an image reading device of a copier, a facsimile machine or the like, an original is exposed by a light source, a thus-obtained reflected light from the original is imaged onto a CCD image sensor. Thus, the image of the original is read, and, thus-obtained analog image data is A-D converted into digital data of 8 bits, for example.
In such a case, the CCD image sensor has a white shading function and a black shading function in general so that a dynamic range of an A-D converter can be used widely even if there occurs variation in sensitivity of the CCD image sensor, and variation in signal component due to dark current, for respective pixels. With regard to these functions, various methods have been proposed in Japanese Laid-Open Patent Applications Nos. 62-235871, 63-18763, 9-9056, 11-27522 and so forth, for example.
With regard to the black shading correction, in an image reading device in which an image of an original is formed on a CCD image sensor through a most general reduction (not unity magnification) optical system, when the CCD image sensor itself has always shaded black dummy pixels at a part thereof, black dummy output to be used for the black shading correction is always available, and, data (data for the black correction) of a reference black level for the black shading correction is always provided for each scan line. Therefore, even in such a case where the reference voltage of the A-D converter is variable, for example, a background removal function is provided such that the upper limit value of the reference voltage of the A-D converter which converts the read analog image data into digital data is made to follow the peak value of the read image data so that the tone of the background of a sheet of the original image may be cut off/removed from the image data, the data for the black correction (black correction data) used for the black shading correction can be made variable according to the variable reference voltage.
Thus, as a result of the black correction data being provided for each scan line, the black correction data can be made variable according to the reference voltage, even in such a case where the background removal function is provided in which the reference voltage of the A-D converter is variable.
However, in an image reading device employing a CCD image sensor not having such a measure as to provide the black correction data for each scan line or in a system which performs all pixel correction, it is necessary that the black correction data is generated for one scan line as a result of taking an image from the CCD image sensor with a fixed reference voltage applied to the A-D converter during an interval during which the light source is turned off before the original or a white reference plate is read, and then is stored in a memory. Therefore, in a case where the original is read with the variable reference voltage used by the A-D converter or the different reference voltages are used for reading of the white reference plate and the original, it is not possible to obtain the black correction data variable according to the reference voltage of the A-D converter, because the black correction data is maintained in the memory as mentioned above.
A digital black level value D0_b obtained when an analog black level value Vb is converted through an 8-bit A-D converter using the reference voltage Vref0 can be expressed by the following formula (1):D0—b=INT[Vb/Vref0×255]  (1)where INT[ ] means the value obtained from rounding off the value enclosed by [ ] to the decimal point, also hereinafter. Then, the data D0_b is stored and maintained in a predetermined memory to be used as the black correction data. As shown in the above formula (1), it can be seen that the black correction data D0_b depends on the reference voltage Vref0.
Image data Dshb obtained through the black shading correction from original image data D0_G is calculated by the following formula:Dshb=D0—G−D0—b However, in this case,Dshb=INT[Vw/Vref1×255]−INT[Vb/Vref0×255]  (2)where Vw denotes a voltage of the analog image data obtained when the original is read, and Vref0 denotes the reference voltage of the A-D converter at this time. Thus, the reference voltage of the A-D converter is different between the case of detecting the reference black tone level and the case of reading the original, and, by using the digital image data obtained by using the different reference voltages of the A-D converter, the calculation of the black shading correction is performed. Thereby, precise calculation cannot be achieved.